import socket
import threading
import time

loop = 0;
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
#for data in [b'Michael', b'Tracy', b'Sarah']:
while (loop < 10000):
     s.sendto(b'hello world', ('127.0.0.1', 8501))
     print('%d, %s' % (loop, s.recv(1024).decode('utf-8')))
     s.sendto(b'WRS hello', ('127.0.0.1', 8501))
     print('%d, %s' % (loop, s.recv(1024).decode('utf-8')))
     loop = loop + 1;
s.close()
